import request from '@/utils/request'

// 新增工单信息
export function carWorkOrder(data) {
    return request({
        url: '/car/carWorkOrder',
        method: 'post',
        data: data
    })
}

// 查询车辆基础信息下拉框记录
export function queryList(query) {
    return request({
        url: '/car/carBasic/queryList',
        method: 'get',
        params: query
    })
}

// 查询GPS工单信息列表
export function gpslist(query) {
    return request({
        url: '/car/carWorkOrder/gps/list',
        method: 'get',
        params: query
    })
}
// 车辆GPS安装数量
export function gpsInstallCount(query) {
    return request({
        url: '/car/gpsInstall/gpsInstallCount',
        method: 'get',
        params: query
    })
}
// GPS安装工单批量处理
export function batchInstallWorkOrderDispose(data) {
    return request({
        url: '/car/carWorkOrder/gps/batchInstallWorkOrderDispose',
        method: 'post',
        data: data
    })
}

// 获取车辆GPS安装信息详细信息
export function gpsInstall(gpsInstallId) {
    return request({
        url: '/car/gpsInstall/' + gpsInstallId,
        method: 'get'
    })
}

// 新增车辆GPS安装信息
export function saveCarGpsInstall(data) {
    return request({
        url: '/car/gpsInstall/saveCarGpsInstall',
        method: 'post',
        data: data
    })
}

// 批量新增车辆GPS安装信息
export function saveBatchCarGpsInstall(data) {
    return request({
        url: '/car/gpsInstall/saveBatchCarGpsInstall',
        method: 'post',
        data: data
    })
}

// 获取车辆GPS维修信息详细信息
export function gpsMaintenance(gpsMaintenanceId) {
    return request({
        url: '/car/gpsMaintenance/' + gpsMaintenanceId,
        method: 'get'
    })
}

// 新增车辆GPS维修信息
export function saveCarGpsMaintenance(data) {
    return request({
        url: '/car/gpsMaintenance/saveCarGpsMaintenance',
        method: 'post',
        data: data
    })
}

// 修改车辆GPS维修信息
export function updateCarGpsMaintenance(data) {
    return request({
        url: '/car/gpsMaintenance/updateCarGpsMaintenance',
        method: 'post',
        data: data
    })
}

// 获取车辆GPS续费信息详细信息
export function gpsRenew(gpsRenewId) {
    return request({
        url: '/car/gpsRenew/' + gpsRenewId,
        method: 'get'
    })
}

// 新增车辆GPS续费信息
export function saveCarGpsRenew(data) {
    return request({
        url: '/car/gpsRenew/saveCarGpsRenew',
        method: 'post',
        data: data
    })
}

// 修改车辆GPS续费信息
export function updateCarGpsRenew(data) {
    return request({
        url: '/car/gpsRenew/updateCarGpsRenew',
        method: 'post',
        data: data
    })
}

// 获取车辆gps拆除信息详细信息
export function getCarGpsDismantle(gpsDismantleId) {
    return request({
        url: '/car/carGpsDismantle/' + gpsDismantleId,
        method: 'get'
    })
}

// 新增车辆gps拆除信息
export function carGpsDismantle(data) {
    return request({
        url: '/car/carGpsDismantle',
        method: 'post',
        data: data
    })
}

// 修改车辆gps拆除信息
export function carGpsDismantleUpdate(data) {
    return request({
        url: '/car/carGpsDismantle',
        method: 'put',
        data: data
    })
}

// 获取车辆gps排查信息详细信息
export function getCarGpsTroubleshoot(gpsTroubleshootId) {
    return request({
        url: '/system/carGpsTroubleshoot/' + gpsTroubleshootId,
        method: 'get'
    })
}

// 新增车辆gps排查信息
export function carGpsTroubleshoot(data) {
    return request({
        url: '/system/carGpsTroubleshoot',
        method: 'post',
        data: data
    })
}

// 修改车辆gps排查信息
export function carGpsTroubleshootUpdate(data) {
    return request({
        url: '/system/carGpsTroubleshoot',
        method: 'put',
        data: data
    })
}

// 删除车辆gps排查信息
export function carGpsTroubleshootDel(gpsTroubleshootIds) {
    return request({
        url: '/system/carGpsTroubleshoot/' + gpsTroubleshootIds,
        method: 'delete'
    })
}

// 查询车辆gps设备管理信息列表
export function carGpsManagementList(query) {
    return request({
        url: '/gps/carGpsManagement/list',
        method: 'get',
        params: query
    })
}

// 获取车辆gps设备管理信息详细信息
export function carGpsManagementDetail(carId, workType) {
    return request({
        url: '/gps/carGpsManagement/'+carId+'/'+workType,
        method: 'get'
    })
}

// 获取车辆gps记录列表
export function carGpsManagementRecord(carId) {
    return request({
        url: '/gps/carGpsManagement/'+carId,
        method: 'get'
    })
}

// 删除车辆gps设备管理信息
export function carGpsManagementDel(gpsManagementIds) {
    return request({
        url: '/gps/carGpsManagement/' + gpsManagementIds,
        method: 'delete'
    })
}

// 查询车辆gps监控信息列表
export function carGpsMonitorList(query) {
    return request({
        url: '/car/carGpsMonitoring/list',
        method: 'get',
        params: query
    })
}

// 删除车辆gps监控信息
export function carGpsMonitorDel(gpsMonitoringIds) {
    return request({
        url: '/car/carGpsMonitoring/' + gpsMonitoringIds,
        method: 'delete'
    })
}

// 获取车辆gps监控信息详细信息
export function carGpsMonitoringDetail(carId) {
    return request({
        url: '/car/carGpsMonitoring/'+carId,
        method: 'get'
    })
}

// 获取车辆gps监控报警记录
export function getAlarmRecord(carId) {
    return request({
        url: '/car/carGpsMonitoring/getAlarmRecord/'+carId,
        method: 'get'
    })
}

// 查询车辆gps续费信息列表
export function gpsRenewList(query) {
    return request({
        url: '/car/gpsRenew/list',
        method: 'get',
        params: query
    })
}

// 查询车辆gps续费记录列表
export function gpsRenewRecord(query) {
    return request({
        url: '/car/gpsRenew/record/list',
        method: 'get',
        params: query
    })
}

// 删除车辆GPS续费信息
export function gpsRenewDel(ids) {
    return request({
        url: '/car/gpsRenew/'+ids,
        method: 'post'
    })
}

// 获取车辆GPS安装SIM卡号 编号信息
export function gpsSimInfo(query) {
    return request({
        url: `/car/gpsInstall/gpsSimCodeInfo`,
        method: 'get',
        params: query
    })
}

// 查询GPS工单信息
export function carWorkOrderInfo(query) {
    return request({
        url: `/car/carWorkOrder/gps/Info`,
        method: 'get',
        params: query
    })
}

// 子订单跳转参数
export function orderCarParam(orderCarCode) {
    return request({
        url: `/order/orderCar/orderCarParam/${orderCarCode}`,
        method: 'get'
    })
}
